<template>
  <struc header footer>
    <head-nav-bar slot="header" @click-left="onClickLeft">
      <div class="title" slot="title">
        <div class="title-wrap">
          <router-link to="/home/homeHot" tag="div" :class="{active: this.$route.path === '/home/homeHot'}">热门</router-link>
          <router-link to="/home/homeFollow" tag="div" :class="{active: this.$route.path === '/home/homeFollow'}">关注</router-link>
        </div>
      </div>
    </head-nav-bar>
    <div slot="main">
      <router-view class="main-router"/>
    </div>
    <footer slot="footer">
      <foot-nav :navIndex="0" />
    </footer>
  </struc>
</template>

<script>
  export default {
    data() {
      return {
        list: [],
        loading: false,
        finished: false
      };
    },
    created() {

    },
    mounted() {

    },
    methods: {
      onClickLeft() {
        this.$router.go(-1)
      },

    }
  }
</script>

<style lang="scss" scoped>
  $redBg: #e74744;

  .header{
    .title{
      height: 46px;
      display: flex;
      justify-content: center;
      align-items: center;
      .title-wrap{
        width: 100px;
        height: 24px;
        border-radius: 12px;
        font-size: 15px;
        background: #f47e7b;
        line-height: 24px;
        text-align: center;
        display: flex;
        div{
          width: 50%;
          border-radius: 12px;
        }
        div.active{
          background: #fff;
          color: red;
        }
      }
    }
  }
  .main-router{
    width: 100%;
    height: 100%;
  }
</style>
